#!/bin/bash
PWD=`pwd`
CONFIT_DIR="/etc/shadowsocks-libev/"
INSTALL_DOCKER=`whereis docker | grep bin/docker | wc -l`
if [ $INSTALL_DOCKER = 0 ]
then
    echo “正在安装docker...”
    curl -fsSL get.docker.com | sh
fi
if [ ! -d $CONFIG_DIR ]
then
    echo "正在创建配置文件..."
    sudo mkdir $CONFIT_DIR
fi 
sudo cp $PWD/config.json /etc/shadowsocks-libev/

sudo systemctl enable docker
sudo systemctl start docker

sudo docker build -t wenxin/ss .

sudo docker run -d -v /etc/shadowsocks-libev/:/etc/shadowsocks-libev/ -p 8388:8388 --name ss wenxin/ss

